Skip to content

add test specs#15845

Open
dmcilvaney wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
dmcilvaney:damcilva/temp/spec_change_to_3.0_v2
Open

add test specs#15845
dmcilvaney wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
dmcilvaney:damcilva/temp/spec_change_to_3.0_v2

Conversation

@dmcilvaney
Copy link
Contributor

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

Change Log
  • Change
  • Change
  • Change
Does this affect the toolchain?

YES/NO

Associated issues
  • #xxxx
Links to CVEs
Test Methodology
  • Pipeline build id: xxxx

Copilot AI review requested due to automatic review settings February 13, 2026 23:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds/updates RPM spec content under base/comps/, ostensibly to introduce a go-md2man spec and tweak a TODO comment in azurelinux-release.

Changes:

  • Added a new local RPM spec file for go-md2man.
  • Updated the eol_date TODO comment in azurelinux-release.spec.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
base/comps/go-md2man/go-md2man.spec Introduces a new local spec for building/installing go-md2man.
base/comps/azurelinux-release/azurelinux-release.spec Updates a TODO comment related to the eol_date macro.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +4
Summary: Converts markdown into roff (man pages)
Name: go-md2man
Version: 2.0.2
Release: 1%{?dist}
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This spec file is added without any corresponding component definition (e.g., base/comps/go-md2man/go-md2man.comp.toml or an entry in base/comps/components.toml). As-is, go-md2man will not be picked up by includes = ["**/*.comp.toml"], so it won’t build as part of the distro. Add a .comp.toml for the component (or otherwise wire it into the component set), or move/remove this file if it’s only intended as a test artifact.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +10
Summary: Converts markdown into roff (man pages)
Name: go-md2man
Version: 2.0.2
Release: 1%{?dist}
License: MIT
Vendor: Microsoft Corporation
Distribution: Azure Linux
Group: Tools/Container
URL: https://github.com/cpuguy83/go-md2man
Source0: https://github.com/cpuguy83/go-md2man/archive/v%{version}.tar.gz#/go-md2man-%{version}.tar.gz
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository convention is to avoid forking/hand-coding specs for upstream packages and instead use upstream specs + overlays; local specs are currently only used for Azure Linux-originating components (e.g., azurelinux-release, azurelinux-repos). If go-md2man is not Azure Linux-originating, please switch this to an upstream component with overlays rather than introducing a local .spec.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
Vendor: Microsoft Corporation
Distribution: Azure Linux
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vendor: and Distribution: appear again after %description. At that point they will be treated as part of the package description text (not header tags), which is likely unintended and duplicates the header metadata. Remove these lines or move any intended tag definitions into the header section.

Suggested change
Vendor: Microsoft Corporation
Distribution: Azure Linux

Copilot uses AI. Check for mistakes.
URL: https://github.com/cpuguy83/go-md2man
Source0: https://github.com/cpuguy83/go-md2man/archive/v%{version}.tar.gz#/go-md2man-%{version}.tar.gz
BuildRequires: golang
BuildRequires: which
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildRequires: which is not used anywhere in this spec (no invocation of which in build/install/check). Please drop the unused BuildRequires to keep the dependency set minimal.

Suggested change
BuildRequires: which

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +43
%setup -q -n %{name}-%{version} -c

%build
export GOPATH=%{OUR_GOPATH}
export GOCACHE=%{OUR_GOPATH}/.cache
export CGO_ENABLED=0
export GO111MODULE=on

cd %{_topdir}/BUILD/%{name}-%{version}/go-md2man-%{version}
go build -mod vendor -o go-md2man

%install
mkdir -p "%{buildroot}%{_bindir}"
cp -aT go-md2man-%{version}/go-md2man %{buildroot}%{_bindir}/go-md2man

# copy legal files
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
cp go-md2man-%{version}/LICENSE.md %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE.md
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The %setup ... -c + absolute cd %{_topdir}/BUILD/... approach creates a nested source dir and hard-codes build paths, making the spec harder to maintain and more brittle across build environments. Prefer a single top-level source dir and relative/standard macros (e.g., %{_builddir}) so subsequent sections don’t depend on the nested layout.

Suggested change
%setup -q -n %{name}-%{version} -c
%build
export GOPATH=%{OUR_GOPATH}
export GOCACHE=%{OUR_GOPATH}/.cache
export CGO_ENABLED=0
export GO111MODULE=on
cd %{_topdir}/BUILD/%{name}-%{version}/go-md2man-%{version}
go build -mod vendor -o go-md2man
%install
mkdir -p "%{buildroot}%{_bindir}"
cp -aT go-md2man-%{version}/go-md2man %{buildroot}%{_bindir}/go-md2man
# copy legal files
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
cp go-md2man-%{version}/LICENSE.md %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE.md
%setup -q -n go-md2man-%{version}
%build
cd go-md2man-%{version}
export GOPATH=%{OUR_GOPATH}
export GOCACHE=%{OUR_GOPATH}/.cache
export CGO_ENABLED=0
export GO111MODULE=on
go build -mod vendor -o go-md2man
%install
cd go-md2man-%{version}
mkdir -p "%{buildroot}%{_bindir}"
cp -aT go-md2man %{buildroot}%{_bindir}/go-md2man
# copy legal files
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
cp LICENSE.md %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE.md

Copilot uses AI. Check for mistakes.
%define is_development 1

# TODO(azl): review
# TODO(azl): review -- set to a future date for now, fix before release
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says “set to a future date for now”, but eol_date is currently 1900-01-01 (a past date). Please update the comment to match the current placeholder strategy, or update eol_date if the intent really is to use a future placeholder.

Suggested change
# TODO(azl): review -- set to a future date for now, fix before release
# TODO(azl): review -- placeholder EOL date; 1900-01-01 indicates EOL not yet finalized

Copilot uses AI. Check for mistakes.
@dmcilvaney dmcilvaney force-pushed the damcilva/temp/spec_change_to_3.0_v2 branch from 4f86d31 to 55c64ba Compare February 14, 2026 00:11
@github-actions
Copy link

Spec Review Failed

Type Count
Errors 11
Warnings 5
Suggestions 5

🛠️ Debug locally: .github/workflows/scripts/README.md

azurelinux-release.spec

❌ Errors (3)
⚠️ Warnings (2)
💡 Suggestions (3)

go-md2man.spec

❌ Errors (8)
⚠️ Warnings (3)
💡 Suggestions (2)
📄 Raw JSON Report
{
  "spec_reviews": [
    {
      "spec_file": "base/comps/azurelinux-release/azurelinux-release.spec",
      "errors": [
        {
          "description": "identity-basic subpackage is independent but does not include a %license entry for applicable license text.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#subpackage-licensing",
          "line": 421
        },
        {
          "description": "identity-wsl subpackage Requires(meta) points to azurelinux-release-container instead of azurelinux-release-wsl, which mismatches the variant package.",
          "citation": "N/A",
          "line": 207
        },
        {
          "description": "Placeholder EOL date 1900-01-01 produces an invalid SUPPORT_END value and is marked as TODO.",
          "citation": "N/A",
          "line": 9
        }
      ],
      "warnings": [
        {
          "description": "Summary for identity-wsl ends with a period; Summary should not end with a period.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections",
          "line": 202
        },
        {
          "description": "Prerelease builds should use a tilde in Version for correct ordering; current prerelease signal is only in Release.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/",
          "line": 38
        }
      ],
      "suggestions": [
        {
          "description": "Grammar: use 'an Azure Linux' instead of 'a Azure Linux' in descriptions.",
          "citation": "N/A",
          "line": 100
        },
        {
          "description": "Wrap description lines to 80 characters or less.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/#_summary_and_description",
          "line": 100
        },
        {
          "description": "Use %{_datadir} instead of %{_prefix}/share for data paths (dnf5 config install/%files).",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/RPMMacros/",
          "line": 387
        }
      ]
    },
    {
      "spec_file": "base/comps/go-md2man/go-md2man.spec",
      "errors": [
        {
          "description": "Forbidden Vendor tag is present.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections",
          "line": 6
        },
        {
          "description": "Vendor tag appears again after %description and must not be used.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections",
          "line": 22
        },
        {
          "description": "Missing required BuildRequires: go-rpm-macros for Go packages.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 11
        },
        {
          "description": "Missing BuildRequires: go-vendor-tools for required vendoring/license tooling.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 11
        },
        {
          "description": "Go packages must vendor dependencies and include go-vendor-tools.toml/vendor archive; none are declared.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 10
        },
        {
          "description": "License tag must include cumulative SPDX expression covering vendored modules; only MIT is listed.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 5
        },
        {
          "description": "Missing bundled(golang(IMPORT_PATH)) Provides for vendored modules.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 15
        },
        {
          "description": "Build uses raw 'go build' instead of %gobuild or %gobuild_*flags, so Fedora Go compiler flags are not preserved.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 35
        }
      ],
      "warnings": [
        {
          "description": "Deprecated Group tag is used.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections",
          "line": 8
        },
        {
          "description": "Go binaries should set ExclusiveArch to %{golang_arches} (or %{golang_arches_future}).",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 2
        },
        {
          "description": "No %check section; Go packages should run unit tests (and go_vendor_license_check when vendored).",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/",
          "line": 28
        }
      ],
      "suggestions": [
        {
          "description": "Consider using Release: %autorelease for automated release numbering.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/",
          "line": 4
        },
        {
          "description": "Consider using %autochangelog instead of manual changelog entries.",
          "citation": "https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs",
          "line": 49
        }
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant